package com.epam.submenu.submenu1;

import java.util.ArrayList;
import java.util.List;

import com.epam.menu.Menu;
import com.epam.menu.MenuItem;
import com.epam.submenu.submenu1.submenu1_1.*;

public class Order1 extends MenuItem {
	
	private final Menu subMenu;
	private static final List<MenuItem> items;
	
	static{
		items = new ArrayList<MenuItem>();
		items.add(new DiamondMenu());
		items.add(new EmeraldMenu());
		items.add(new RubyMenu());
		items.add(new GoBack1_1());
	}
	
	public Order1() {
		super("First-order", "1");
		
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		System.out.println("first-order comand");
		subMenu.run();
		return true;
	}

}
